package zsh.service;

import Dao.IDao;
import domain.Student;

import java.sql.SQLException;
import java.util.List;

public class ServiceImpl implements IService{

    private IDao dao;

    public ServiceImpl() {
        this.dao = this.dao;
    }

    @Override
    public List<Student> getStudents(Student student) throws SQLException {
        // 编写业务逻辑
        return dao.list(student);
    }
    @Override
    public void addStudent(Student student) throws SQLException {
        dao.addStudent(student);
    }

    @Override
    public void updateStudent(Student student) throws SQLException {
        dao.updateStudent(student);
    }

    @Override
    public void deleteStudent(int id) throws SQLException {
        dao.deleteStudent(id);
    }

}
